package com.hk.employeemanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * @author by 何坤
 * @Classname DepartmentEntity
 * @Description TODO
 * @Date 2019/12/18 10:37
 */
@TableName("tab_department")
public class DepartmentEntity {
    @TableId(value = "dep_id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "dep_name")
    private String name;

    @TableField(value = "dep_parent_id")
    private Integer parentId;

    @TableField(value = "dep_department_path")
    private String departmentPath;

    @TableField(value = "dep_enabled")
    private Boolean enabled;

    @TableField(value = "dep_parent")
    private Boolean parent;

    @TableField(value = "dep_info")
    private String info;

    @TableField(exist = false)
    private List<DepartmentEntity> childDepartments;

    @TableField(exist = false)
    private Integer result;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getDepartmentPath() {
        return departmentPath;
    }

    public void setDepartmentPath(String departmentPath) {
        this.departmentPath = departmentPath;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Boolean getParent() {
        return parent;
    }

    public void setParent(Boolean parent) {
        this.parent = parent;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public List<DepartmentEntity> getChildDepartments() {
        return childDepartments;
    }

    public void setChildDepartments(List<DepartmentEntity> childDepartments) {
        this.childDepartments = childDepartments;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "DepartmentEntity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", parentId=" + parentId +
                ", departmentPath='" + departmentPath + '\'' +
                ", enabled=" + enabled +
                ", parent=" + parent +
                ", info='" + info + '\'' +
                ", result='" + result + '\'' +
                ", childDepartments=" + childDepartments +
                '}';
    }
}
